package com.happystreet.mission
{
	import com.happystreet.engine.CoreObject;
	
	import flash.utils.Dictionary;

	public class MissionData
	{
		//照片任务
		public static const TYPE_TAKE_PICTURE:String = "TP";
		//升级货车
		public static const TYPE_UPGRADE_TRUCK:String = "UT";
		//满足顾客
		public static const TYPE_SATISFY_CUSTOMER:String = "SC";
		//订货
		public static const TYPE_ORDER_GOOD:String = "OG";
		
		public var id:String;
		public var title:String;
		public var helpText:String;
		public var customHelpContent:CoreObject;
		public var missionSymbolName:String;
		public var tutoSymbolName:String;
		//奖励类型
		public var rewardType:String;
		//奖励数量
		public var rewardQuantity:uint;
		//奖励物品id
		public var rewardItemId:int;
		//顾客id
		public var customerId:int;
		//角色名
		public var characterName:String;
		public var type:String;
		//先进价
		public var cashPrice:int;
		//多少章
		public var chapter:int;
		//总章
		public var chaptersTotal:int;
		//目标进度列表
		public var goalProgressTable:Array;
		//目标标记列表
		public var goalLabelTable:Array;
		//目标元件名列表
		public var goalSymbolNameTable:Array;
		public var goalMaxProgressTable:Array;
		public var goalNamesToIndexDictionary:Dictionary;
		public var goalCount:int;
		//跳过
		public var isSkipped:Boolean;
		public function MissionData(missionTemp:MissionTemplate)
		{
			this.id = missionTemp.id;
			this.title = missionTemp.title;
			this.helpText = missionTemp.helpText;
			this.customHelpContent = missionTemp.customHelpContent;
			this.missionSymbolName = missionTemp.missionSymbolName;
			this.tutoSymbolName = missionTemp.tutoSymbolName;
			this.rewardType = missionTemp.rewardType;
			this.rewardQuantity = missionTemp.rewardQuantity;
			this.rewardItemId = missionTemp.rewardItemId;
			this.customerId = missionTemp.customerId;
			this.characterName = missionTemp.characterName;
			this.type = missionTemp.type;
			this.cashPrice = missionTemp.cashPrice;
			this.chapter = missionTemp.chapter;
			this.chaptersTotal = missionTemp.chaptersTotal;
			this.goalProgressTable = new Array();
			this.goalLabelTable = missionTemp.goalLabelTable;
			this.goalSymbolNameTable = missionTemp.goalSymbolNameTable;
			this.goalMaxProgressTable = missionTemp.goalMaxProgressTable;
			this.goalNamesToIndexDictionary = missionTemp.goalNamesToIndexDictionary;
			this.goalCount = this.goalMaxProgressTable.length;
			this.isSkipped = false;
		}
		
		public function set missionProgress(goals:*):void
		{
			
		}
		
		/**
		 *获取任务进度 
		 * @return 
		 * 
		 */		
		public function get missionProgress():Array
		{
			return [];
		}
	}
}